/* classe per la gestione dei motori di particelle */

#ifndef _PARTICLE_ENGINE_H_
#define _PARTICLE_ENGINE_H_

# define PI 3.141592653589793238462643383279502884197169399375105820974944592

#include "particle.h"
#include <GL/glfw.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include "textures.h"


class ParticleEngine
{
	protected:
		Particle **m_particles;
		int m_pCount;
		/* comodo per disegnare dalle doDrawParticle dei motori */
		TextureManager *textureManager;
	
	public:
		ParticleEngine(int pCount);
		virtual ~ParticleEngine(void);
		GLuint getTextures(int i);
		void initParticles(void);
		void updateParticles(void);
		void drawParticles(void);
		void setTextureManager(TextureManager *txManager);

		/* metodi virtuali in modo da poterci implementare tutti i tipi di particelle che ci interessano */
		virtual void doInitParticles(void) = 0;
		virtual void doUpdateParticles(void) = 0;		
		virtual void doDrawParticles(void) = 0;
};

class ExplosionPE : public ParticleEngine
{
	private:
	
	public:
		ExplosionPE(int pCount);
		~ExplosionPE(void);
		void doInitParticles(void);
		void doUpdateParticles(void);		
		void doDrawParticles(void);		
};

#endif
